/*

Laurel Harbridge-Yong	
Proposal title: You Can't Always Get What You Want: How Majority-Party Agenda-Setting and Ignored Alternatives Shape Public Attitudes

HYPOTHESES

Stated-Hyp1: Our first hypothesis is that voters, on average, will respond less favorably to Congress, the legislation, and the majority party when they are alerted to the agenda-setting role of the majority party and the majority’s decision to ignore alternative proposals.
	
	Test-Hyp1: Voters will respond less favorably to Congress when they are alerted to the agenda-setting role of the majority party. (control vs. minority and bipartisan condition combined)

	Test-Hyp2: Voters will respond less favorably to the legislation when they are alerted to the agenda-setting role of the majority party. (control vs. minority and bipartisan condition combined)
	
	Test-Hyp3: Voters will respond less favorably to the majority party when they are alerted to the agenda-setting role of the majority party. (control vs. minority and bipartisan condition combined)
	
Stated-Hyp2: We expect majority-party voters will express similar evaluations in all three conditions, because they give their preferred party the benefit of the doubt and because they tend to favor the policy pursued by the majority. By contrast, minority-party voters will express lower evaluations in the minority and bipartisan conditions versus the control.

	Test-Hyp4: Majority party Voters will have no difference in favorability rating of Congress when they are alerted to the agenda-setting role of the majority party in control vs. minority condition

	Test-Hyp5: Majority party Voters will have no difference in favorability rating of the legislation when they are alerted to the agenda-setting role of the majority party in control vs. minority condition
	
	Test-Hyp6: Majority party Voters will have no difference in favorability rating of majority party when they are alerted to the agenda-setting role of the majority party in control vs. minority condition

	Test-Hyp7: Majority party Voters will have no difference in favorability rating of Congress when they are alerted to the agenda-setting role of the majority party in control vs. bipartisan condition

	Test-Hyp8: Majority party Voters will have no difference in favorability rating of the legislation when they are alerted to the agenda-setting role of the majority party in control vs. bipartisan condition
	
	Test-Hyp9: Majority party Voters will have no difference in favorability rating of majority party when they are alerted to the agenda-setting role of the majority party in control vs. bipartisan condition
	
	Test-Hyp10: Minority party Voters will have lower favorability rating of Congress when they are alerted to the agenda-setting role of the majority party in control vs. minority condition

	Test-Hyp11: Minority party Voters will have lower favorability rating of the legislation when they are alerted to the agenda-setting role of the majority party in control vs. minority condition
	
	Test-Hyp12: Minority party Voters will have lower favorability rating of majority party when they are alerted to the agenda-setting role of the majority party in control vs. minority condition

	Test-Hyp13: Minority party Voters will have lower favorability rating of Congress when they are alerted to the agenda-setting role of the majority party in control vs. bipartisan condition

	Test-Hyp14: Minority party Voters will have lower favorability rating of the legislation when they are alerted to the agenda-setting role of the majority party in control vs. bipartisan condition
	
	Test-Hyp15: Minority party Voters will have lower favorability rating of majority party when they are alerted to the agenda-setting role of the majority party in control vs. bipartisan condition
	
Stated-Hyp3: An implication of the fairness mechanism is minority-party voters should view the legislative process more negatively in the bipartisan condition than the minority condition. By contrast, the social identity mechanism suggests minority-party voters should have the lowest evaluations in the minority condition
	
	Test-Hyp16: Minority party Voters will have different favorability rating of Congress when they are alerted to the agenda-setting role of the majority party in bipartisan vs. minority condition.

	Test-Hyp17: Minority party Voters will have different favorability rating of the legislation when they are alerted to the agenda-setting role of the majority partyin in bipartisan vs. minority condition.
	
	Test-Hyp18: Minority party Voters will have different favorability rating of majority party when they are alerted to the agenda-setting role of the majority partyin bipartisan vs. minority condition.
	
*/

clear all
use "HarbridgeYong1032.dta", clear

********************************************************************************

* CONSTRUCT INDICATORS OF EXPERIMENTAL MANIPULATIONS

* treatment
	tab DOV_VIG

	* condition: control, minority, bipartisan
	lab def treat 1 "control" 2 "minority" 3 "bipartisan"
	recode DOV_VIG (1=1) (2=3) (3=2) (4=1) (5=3) (6=3) (7=2) (8=2), gen(treat)
	lab val treat treat
	tab treat
	
	
	
	* majority party
	lab def majparty 1 "dem" 2 "rep"
	recode DOV_VIG (1/3=1) (4/8=2), gen (maj_party)
	lab val maj_party majparty
	tab maj_party, mis
	

	
	tab treat maj_party
	
	* majority party is agenda-setting party = majority
	
	/*NOTE: 
	both minority and bipartisan conditions alert voters of the agenda-setting 
	power of the majority party, so we should be comparing both with control
	*/
	recode treat (1=0) (2/3=1), gen(maj_agendasetter)
	tab maj_agendasetter
	
* majority party voter?
	* R's party affiliation
	tab PartyID7, mis

	recode PartyID7 (1/3=1) (5/7=2) (*=.), gen (resp_party)
	lab val resp_party majparty
	tab resp_party, mis
	
	* is R a majority or minority party voter?
	gen majparty_voter = 1 if resp_party==maj_party
	replace majparty_voter=0 if resp_party!=maj_party & resp_party!=.
	tab majparty_voter, mis
	
* CONSTRUCT OUTCOME MEASURES

	* opinion about congress
	clonevar eval_congress =Q2
	replace eval_congress=. if Q2>10
	tab eval_congress
		// higher values indicate greater confidence in congress
	
	* opinion about legislation
	clonevar eval_bill =Q3
	replace eval_bill=. if eval_bill>10
	tab eval_bill
		// higher values indicate more support for bill
	
	* feeling towards majority party
		* feeling thermometer for each party
	clonevar therm_dem = Q6
	clonevar therm_rep = Q7
		
	gen feel_majparty= Q6 if maj_party==1
	replace feel_majparty= Q7 if maj_party==2
	replace feel_majparty=. if feel_majparty>100
	tab feel_majparty, mis
		// higher values mean more warmth towards majority party
	
********************************************************************************

* ANALYSIS
	* note: bonferroni correction needed for all hypotheses: 0.05/3
	
	*Test-Hyp1: Voters will respond less favorably to Congress when they are alerted to the agenda-setting role of the majority party. (control vs. minority and bipartisan condition combined)

	reg eval_congress i.maj_agendasetter
	// do not reject. 0.007
	tess 1.maj_agendasetter -, init(HarbridgeYong1032) bonf(3)
	
	*Test-Hyp2: Voters will respond less favorably to the legislation when they are alerted to the agenda-setting role of the majority party. (control vs. minority and bipartisan condition combined)

	reg eval_bill i.maj_agendasetter
	// do not reject. 0.000
	tess 1.maj_agendasetter - , bonf(3)
	
	*Test-Hyp3: Voters will respond less favorably to the majority party when they are alerted to the agenda-setting role of the majority party. (control vs. minority and bipartisan condition combined)
	
	reg feel_majparty i.maj_agendasetter
	// do not reject. 0.007
	tess 1.maj_agendasetter - , bonf(3)
	
	*Test-Hyp4: Majority party Voters will have no difference in favorability rating of Congress when they are alerted to the agenda-setting role of the majority party in minority condition vs. control

	reg eval_congress i.treat if majparty_voter==1 & treat!=3
	// do not reject. 0.778
	tess 2.treat, bonf(3)
	
	*Test-Hyp5: Majority party Voters will have no difference in favorability rating of the legislation when they are alerted to the agenda-setting role of the majority party in minority condition vs. control

	reg eval_bill i.treat if majparty_voter==1 & treat!=3
	// reject. 0.000 [there is a difference]
	tess 2.treat, bonf(3)
	
	*Test-Hyp6: Majority party Voters will have no difference in favorability rating of majority party when they are alerted to the agenda-setting role of the majority party in minority condition vs. control

	reg feel_majparty i.treat if majparty_voter==1 & treat!=3
	// do not reject. 0.886	
	tess 2.treat, bonf(3)
	
	*Test-Hyp7: Majority party Voters will have no difference in favorability rating of Congress when they are alerted to the agenda-setting role of the majority party in bipartisan condition vs. control

	reg eval_congress i.treat if majparty_voter==1 & treat!=2
	// do not reject. 0.436
	tess 3.treat, bonf(3)
	
	*Test-Hyp8: Majority party Voters will have no difference in favorability rating of the legislation when they are alerted to the agenda-setting role of the majority party in bipartisan condition vs. control

	reg eval_bill i.treat if majparty_voter==1 & treat!=2
	// reject. 0.000 [there is a difference]
	tess 3.treat, bonf(3)
	
	*Test-Hyp9: Majority party Voters will have no difference in favorability rating of majority party when they are alerted to the agenda-setting role of the majority party in bipartisan condition vs. control
	
	reg feel_majparty i.treat if majparty_voter==1 & treat!=2
	// do not reject. 0.065	
	tess 3.treat, bonf(3)
	
	*Test-Hyp10: Minority party Voters will have lower favorability rating of Congress when they are alerted to the agenda-setting role of the majority party in minority condition vs. control
	
	reg eval_congress i.treat if majparty_voter==0 & treat!=3
	// reject. 0.037
	* bonferroni correction: 0.05/3
	tess 2.treat -, bonf(3)
	
	*Test-Hyp11: Minority party Voters will have lower favorability rating of the legislation when they are alerted to the agenda-setting role of the majority party in minority condition vs. control

	reg eval_bill i.treat if majparty_voter==0 & treat!=3
	// do not reject. 0.000
	tess 2.treat -, bonf(3)
	
	*Test-Hyp12: Minority party Voters will have lower favorability rating of majority party when they are alerted to the agenda-setting role of the majority party in minority condition vs. control

	reg feel_majparty i.treat if majparty_voter==0 & treat!=3
	// reject. 0.142
	tess 2.treat -, bonf(3)	
	
	*Test-Hyp13: Minority party Voters will have lower favorability rating of Congress when they are alerted to the agenda-setting role of the majority party in bipartisan condition vs. control
	
	reg eval_congress i.treat if majparty_voter==0 & treat!=2
	// do not reject. 0.002
	tess 3.treat -, bonf(3)

	*Test-Hyp14: Minority party Voters will have lower favorability rating of the legislation when they are alerted to the agenda-setting role of the majority party in bipartisan condition vs. control

	reg eval_bill i.treat if majparty_voter==0 & treat!=2
	// do not reject. 0.000
	tess 3.treat -, bonf(3)
	
	*Test-Hyp15: Minority party Voters will have lower favorability rating of majority party when they are alerted to the agenda-setting role of the majority party in bipartisan condition vs. control
	
	reg feel_majparty i.treat if majparty_voter==0 & treat!=2
	// reject. 0.233
	tess 3.treat -, bonf(3)
	
	*Test-Hyp16: Minority party Voters will have different favorability rating of Congress when they are alerted to the agenda-setting role of the majority party in bipartisan vs. minority condition.

	reg eval_congress i.treat if majparty_voter==0 & treat!=1
	// reject. 0.239
	tess 3.treat, bonf(3)
	
	*Test-Hyp17: Minority party Voters will have different favorability rating of the legislation when they are alerted to the agenda-setting role of the majority partyin in bipartisan vs. minority condition.

	reg eval_bill i.treat if majparty_voter==0 & treat!=1
	// reject. 0.717
	tess 3.treat, bonf(3)
	
	*Test-Hyp18: Minority party Voters will have different favorability rating of majority party when they are alerted to the agenda-setting role of the majority party in bipartisan vs. minority condition.
	
	reg feel_majparty i.treat if majparty_voter==0 & treat!=1
	// reject. 0.795
	tess 3.treat, bonf(3)
